<template>
<div class="layerRtb layerRtb-threecolumn">
    <three-title :title="{name:'惩罚'}"></three-title>
    <div class="layerRtb-scroll thinScroll" v-scrollHeight = "137">
        <div class="analyItem" v-for="(item,index) in fineList" :key="index">
            <p class="analyItemTit tx-center">罚款{{index+1}}</p>
            <div class="analyItemCon">
                <p class="col-md-3">
                    <span class="cLightGray pr8">时间</span>
                    <span>{{item.fineTime}}</span>
                </p>
                <p class="col-md-3">
                    <span class="cLightGray pr8">发起人</span>
                    <span>{{item.u_xingming}}</span>
                </p>
                <p class="col-md-3">
                    <span class="cLightGray pr8">状态</span>
                    <span>{{item.fineState}}</span>
                </p>
                <p class="col-md-3">
                    <span class="cLightGray pr8">金额</span>
                    <span>{{item.fineMoney}}</span>
                </p>
                <p class="col-md-12">
                    <span class="cLightGray pr8">摘要</span>
                    <span>{{item.fineRemark}}</span>
                </p>
            </div>
        </div>
    </div>
    <div class="layerRtb-footer">
        <div class="analyItem">
            <p class="analyItemTit tx-center">综合</p>
           <div class="analyItemCon clearfix">
                <div class="col-md-9">
                    <p class="col-md-4">
                        <span class="pr8">财务待</span>
                        <span class="ng-binding">0.00</span>
                    </p>
                    <p class="col-md-3">
                        <span class="pr8">人事待</span>
                        <span class="ng-binding">0.00</span>
                    </p>

                    <p class="col-md-4">
                        <span class="pr8">已执行</span>
                        <span class="ng-binding">0.00</span>
                    </p>
                    <p class="col-md-4">
                        <span class="pr8">待执行</span>
                        <span class="ng-binding">0.00</span>
                    </p>
                </div>

                <div class="col-md-3 tx-center">
                    <p class="fr mr10" style="margin: 0 auto;width: 100%;">
                        <span class="cLightGray pr8">总计</span>
                        <span class="cRed ng-binding">0.00</span>
                    </p>
                </div>

            </div>
        </div>
    </div>
</div>
</template>
<script>
import {
    mapGetters
} from 'vuex'
import {
    getPmUserinfoFinebyUid
} from '../../Resources/Api'
export default {
    data () {
        return {
            fineList: []
        }
    },
    created () {
        this.getPmUserinfoFinebyUid()
    },
    methods: {
        getPmUserinfoFinebyUid () {
            let _this = this
            _this.fineList = []
            getPmUserinfoFinebyUid({
                uid: this.leftInfo.uid
            }).then(result => {
                if (result.data.Body !== 100) {
                    _this.fineList = result.data.Body
                } else {
                    _this.fineList = []
                }
            }).catch(err => {
                console.log(err)
            })
        }
    },
    computed: {
        ...mapGetters(['leftInfo'])
    },
    watch: {
        leftInfo () {
            this.getPmUserinfoFinebyUid()
        }
    }
}
</script>
